package com.hhs.storage.bean;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class ResponseBeanPage<T> {
    private ResponseBeanPage(){}
    public static ResponseBeanPage getInstance(){
        return new ResponseBeanPage<>();
    }
    /**
     * 返回码
     */
    @ApiModelProperty(name = "code",value = "返回码1正确，0错误(是)",required = true)
    private Integer code;
    /**
     * 错误消息
     */
    @ApiModelProperty(name = "msg",value = "返回错误消息(否)",required = false)
    private String msg;
    /**
     * 数据
     */
    @ApiModelProperty(name = "rows",value = "表格数据(否)",required = false)
    private List<T> rows;
    /**
     * 总数
     */
    @ApiModelProperty(name = "total",value = "总条数(否)",required = false)
    private Long total;
    /**
     * token
     */
    @ApiModelProperty(name = "token",value = "数据(否)",required = false)
    private String token;

    @ApiModelProperty(name = "data",value = "可以写一些灵活数据",required = false)
    private Map<String,Object> data;
}
